export const getTableList = async (operation, pag, tableData) => {
  let day = null
  const nowTime = Date.now()
  const { page, pageSize } = pag.value
  const res = await operation({ page, pageSize })
  console.log(res)
  tableData.value = res.data.dataAll
  tableData.value.forEach((item) => {
    console.log(item)
    const time1 = nowTime - Date.parse(item.createTime)
    console.log(`当前时间${nowTime}, 入库时间${Date.parse(item.createTime)}`)
    day = Math.floor(time1 / (24 * 60 * 60 * 1000))
    item.time = 30 - day
  })
  pag.value.page = res.data.page
  pag.value.pageSize = res.data.pageSize
  pag.value.pagetotal = res.data.total
}
